package com.alm.token.ui.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.alm.token.ConStant;
import com.alm.token.MyApp;
import com.alm.token.R;
import com.alm.token.base.BaseActivity;
import com.alm.token.ui.data.bean.RegisterData;
import com.alm.token.ui.data.bean.UserWalletData;
import com.alm.token.ui.persenter.MyPreenter;
import com.alm.token.ui.view.BaseView;
import com.alm.token.utils.ActionBarHelper;
import com.alm.token.utils.LanguageUtils;
import com.alm.token.utils.SpUtil;

import org.web3j.crypto.Keys;

import java.util.ArrayList;
import java.util.List;

import baibeiwallet.Constant;
import baibeiwallet.WalletManager;
import baibeiwallet.utils.DialogUtils;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class VipApplySplashActivity extends BaseActivity implements BaseView<RegisterData> {


    @Override
    protected MyPreenter initPreenter() {
        return new MyPreenter(this);
    }


    @Override
    protected int getContentViewId() {
        return R.layout.activity_vipapplay_splash;
    }

    @Override
    protected void initVariables() {

    }


    @Override
    protected void initViews() {
        new ActionBarHelper(this).setTitle(getString(R.string.title_hint_item15));
    }

    @Override
    protected void loadData() {

    }

    @Override
    public void onClick(View v) {

    }

    @OnClick({R.id.btn_vipapply_click})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.btn_vipapply_click:
                //解除 查询 当期vip订单
                Intent intent = new Intent(VipApplySplashActivity.this, VipApplyActivity.class);
                intent.putExtra("intentType", getIntent().getIntExtra("intentType",0));
                startActivity(intent);
                break;
        }
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // TODO: add setContentView(...) invocation
        ButterKnife.bind(this);
    }


    @Override
    public void getData(RegisterData registerData) {

    }

    @Override
    public void jumpToLoginAct(int staue) {
        if (staue == 3) {
//            showToast(getString(R.string.common_relogin));
//            Intent intent = new Intent();
//            intent.setAction(ConStant.EXIT_APP);
//            sendBroadcast(intent);
//            startActivity(BlockWalletLoginActivity.class);
//            finish();
        } else if (staue == 4) {
//            showToast(getString(R.string.paypasw_hint_setpaypsw));
//            Intent intent = new Intent(getActivity(),PayPwdActivity.class);
//            intent.putExtra("PayPwdActivityType",PayPwdActivity.PAYPSW_SET);
//            startActivity(intent);
//            getActivity().finish();
            showToSetPaypswDialog();
        } else if (staue == 666) {
            showToUpdata();
        }
    }

    @Override
    public void onError(String error) {
        showToast(getString(R.string.common_loaderrritry));
    }

    @Override
    public void ShowProgress() {
        showWaitDialog();
    }

    @Override
    public void hideProgress() {
        hideWaitDialog();
    }
}
